{layout name="../../admin/view/layout/main" /}
{:breadcrumb(['UI 示例:example/layout/index', '表单:example/forms/index', '开关'])}
<div class="row">

    <div class="col-lg-12">
      <div class="card">
        <div class="card-body">

          <p>开关具有自定义复选框的标记，但使用 <code>.form-switch</code> 类来呈现切换开关。考虑使用 <code>role="switch"</code> 更准确地将控件的性质传达给支持此角色的辅助技术。在较旧的辅助技术中，它只会作为一个常规复选框被宣布为后备。开关也支持禁用属性。</p>
          <div class="border-example">
            <div class="form-check form-switch">
              <input class="form-check-input" type="checkbox" role="switch" id="flexSwitchCheckDefault">
              <label class="form-check-label" for="flexSwitchCheckDefault">默认开关复选框输入</label>
            </div>
            <div class="form-check form-switch">
              <input class="form-check-input" type="checkbox" role="switch" id="flexSwitchCheckChecked" checked="">
              <label class="form-check-label" for="flexSwitchCheckChecked">选中开关复选框输入</label>
            </div>
            <div class="form-check form-switch">
              <input class="form-check-input" type="checkbox" role="switch" id="flexSwitchCheckDisabled" disabled="">
              <label class="form-check-label" for="flexSwitchCheckDisabled">Disabled switch checkbox input</label>
            </div>
            <div class="form-check form-switch">
              <input class="form-check-input" type="checkbox" role="switch" id="flexSwitchCheckCheckedDisabled" checked="" disabled="">
              <label class="form-check-label" for="flexSwitchCheckCheckedDisabled">Disabled checked switch checkbox input</label>
            </div>
          </div>
          <pre>&lt;div class="form-check form-switch"&gt;
  &lt;input class="form-check-input" type="checkbox" role="switch" id="flexSwitchCheckDefault"&gt;
  &lt;label class="form-check-label" for="flexSwitchCheckDefault"&gt;默认开关复选框输入&lt;/label&gt;
&lt;/div&gt;
&lt;div class="form-check form-switch"&gt;
  &lt;input class="form-check-input" type="checkbox" role="switch" id="flexSwitchCheckChecked" checked&gt;
  &lt;label class="form-check-label" for="flexSwitchCheckChecked"&gt;选中开关复选框输入&lt;/label&gt;
&lt;/div&gt;
&lt;div class="form-check form-switch"&gt;
  &lt;input class="form-check-input" type="checkbox" role="switch" id="flexSwitchCheckDisabled" disabled&gt;
  &lt;label class="form-check-label" for="flexSwitchCheckDisabled"&gt;禁用开关复选框输入&lt;/label&gt;
&lt;/div&gt;
&lt;div class="form-check form-switch"&gt;
  &lt;input class="form-check-input" type="checkbox" role="switch" id="flexSwitchCheckCheckedDisabled" checked disabled&gt;
  &lt;label class="form-check-label" for="flexSwitchCheckCheckedDisabled"&gt;禁用复选开关复选框输入&lt;/label&gt;
&lt;/div&gt;</pre>

        </div>
      </div>
    </div>

    <div class="col-lg-12">
      <div class="card">
        <header class="card-header"><div class="card-title">不同颜色的开关</div></header>
        <div class="card-body">
          <div class="form-check form-switch">
            <input class="form-check-input form-check-blue" type="checkbox" id="formSwitchCheckBoxBlue" checked="">
            <label class="form-check-label" for="formSwitchCheckBoxBlue">
              蓝色的开关复选框
            </label>
          </div>
          <div class="form-check form-switch">
            <input class="form-check-input form-check-indigo" type="checkbox" id="formSwitchCheckBoxIndigo" checked="">
            <label class="form-check-label" for="formSwitchCheckBoxIndigo">
              靛蓝的开关复选框
            </label>
          </div>
          <div class="form-check form-switch">
            <input class="form-check-input form-check-purple" type="checkbox" id="formSwitchCheckBoxPurple" checked="">
            <label class="form-check-label" for="formSwitchCheckBoxPurple">
              紫色的开关复选框
            </label>
          </div>
          <div class="form-check form-switch">
            <input class="form-check-input form-check-pink" type="checkbox" id="formSwitchCheckBoxPink" checked="">
            <label class="form-check-label" for="formSwitchCheckBoxPink">
              粉红的开关复选框
            </label>
          </div>
          <div class="form-check form-switch">
            <input class="form-check-input form-check-red" type="checkbox" id="formSwitchCheckBoxRed" checked="">
            <label class="form-check-label" for="formSwitchCheckBoxRed">
              红色的开关复选框
            </label>
          </div>
          <div class="form-check form-switch">
            <input class="form-check-input form-check-orange" type="checkbox" id="formSwitchCheckBoxOrange" checked="">
            <label class="form-check-label" for="formSwitchCheckBoxOrange">
              橙色的开关复选框
            </label>
          </div>
          <div class="form-check form-switch">
            <input class="form-check-input form-check-yellow" type="checkbox" id="formSwitchCheckBoxYellow" checked="">
            <label class="form-check-label" for="formSwitchCheckBoxYellow">
              黄色的开关复选框
            </label>
          </div>
          <div class="form-check form-switch">
            <input class="form-check-input form-check-green" type="checkbox" id="formSwitchCheckBoxGreen" checked="">
            <label class="form-check-label" for="formSwitchCheckBoxGreen">
              绿色的开关复选框
            </label>
          </div>
          <div class="form-check form-switch">
            <input class="form-check-input form-check-cyan" type="checkbox" id="formSwitchCheckBoxCyan" checked="">
            <label class="form-check-label" for="formSwitchCheckBoxCyan">
              青色的开关复选框
            </label>
          </div>
          <div class="form-check form-switch">
            <input class="form-check-input form-check-brown" type="checkbox" id="formSwitchCheckBoxBrown" checked="">
            <label class="form-check-label" for="formSwitchCheckBoxBrown">
              棕色的开关复选框
            </label>
          </div>
          <div class="form-check form-switch">
            <input class="form-check-input form-check-gray" type="checkbox" id="formSwitchCheckBoxGray" checked="">
            <label class="form-check-label" for="formSwitchCheckBoxGray">
              灰色的开关复选框
            </label>
          </div>
          <div class="form-check form-switch">
            <input class="form-check-input form-check-dark" type="checkbox" id="formSwitchCheckBoxDark" checked="">
            <label class="form-check-label" for="formSwitchCheckBoxDark">
              黑色的开关复选框
            </label>
          </div>
          <div class="form-check form-switch">
            <input class="form-check-input form-check-teal" type="checkbox" id="formSwitchCheckBoxTeal" checked="">
            <label class="form-check-label" for="formSwitchCheckBoxTeal">
              蓝绿色的开关复选框
            </label>
          </div>
        </div>
      </div>
    </div>

  </div>